<?php
session_start();
ob_clean();
include('top.php');
if(empty($_SESSION['taal'])) {
	session_destroy();
		Header( "HTTP/1.1 301 Moved Permanently" );
		 
		Header( "Location: login.php" ); 
}
if($_SESSION['login'] > "0") { 
				session_destroy();	
				Header( "HTTP/1.1 301 Moved Permanently" );
				Header( "Location: login.php" );  }

echo "<br /><h2><div style='text-align: center'> $updb[$taal] Europa Rollers</div></h2>";
require_once('pasmy/dbwaarden.php');
echo "<br><br>";
$mysql_id = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($db, $mysql_id);

if(isset($_POST["update"])){
	
	$maal = $_POST["eigproc"]/100; 
	$procenten = $_POST["eigproc"];
	
$sql="Select pal,cat,gumea FROM rollers";
$res = mysql_query($sql, $mysql_id);
	while ($row = mysql_fetch_row($res)) {
		$row1 = number_format($row[1] + ($row[1]*$maal),2);
		$row2 = number_format($row[2] + ($row[2]*$maal),2);
		$sql2 = "UPDATE rollers SET cat=$row1,gumea=$row2  WHERE pal='$row[0]'";
		$res2 = mysql_query($sql2, $mysql_id);
	}
		
}
$nieuweprijs = (100 * $maal)+ 100;
?>

<br /><br /><br />
<strong><div style="text-align: center"><?php echo "$werdenverhoogd[$taal]" . "&nbsp;" . "$procenten";?>%</div></strong>
<br /><br /><br />



<?php
include('footer.php');
?>